<html><head><title>MousePick</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">MousePick()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result = <font color="#3A3966"><b>MousePick</b></font>(#Camera, x, y [, PickMask])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>


Simulates a mouse click and returns which object is under the specified 2D point on the 
specified camera. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Camera</i></td>
<td width="90%"> 
The camera to use. 

</td></tr>
<tr><td><i>x, y</i></td>
<td> 
The coordinates, in pixels, of the point. 

</td></tr>
<tr><td><i>PickMask (optional)</i></td>
<td> 
The entity mask used while performing the ray cast. Only the entities with a mask matching 
the PickMask value will be reported. If this parameter is omitted, all the entities are valid 
for the ray detection. The mask can be a combination, to select more than one entity group. 
To have more information about pick mask, see <a href="../entity/createentity.html">CreateEntity()</a>. 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

The returned value can be: 
<pre><font face="Courier New, Courier, mono"size="2">  -1 : Nothing has been detected
  <font color="#924B72">#PB_World_WaterPick</font>: the click occurred on the water.
  <font color="#924B72">#PB_World_TerrainPick</font>: the click occurred on a terrain.
  0 and above: the click occurred on the #Entity. The entity pick is based on its bounding box, not on its mesh.
</font></pre>
To get more information about the picked object position, use <a href="pickx.html">PickX()</a>, <a href="picky.html">PickY()</a> and <a href="pickz.html">PickZ()</a>. 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=loadworld.html>LoadWorld()</a> - <a href="index.html">Engine3D Index</a> - <a href="mouseraycast.html">MouseRayCast()</a> -><br><br>

</body></html>